<?php
/*
	首页
*/

defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$id=intval($_RQ['id']);
	if(!$id){
		exi('请扫码！','error');
	}
	$item=pdo_get('jy_ewmfee_list',array('uniacid'=>$_SESSION['uniacid'],'id'=>$id));
	if(!$item['type'] && $item['url']){
		exi('','',$item['url']);
	}
	if($item['type']==1 && $item['levelid']){
		$_SESSION['jlevel']=$item['levelid'];
		$_SESSION['fewm']=$item['id'];
	}elseif($item['type']==2 && $item['levelid']){
		$fromuser=pdo_getcolumn('core_members',array('id'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']),'fromuser');
		$levelid=pdo_getcolumn('jy_weishop_member',array('mid'=>$fromuser,'merchid'=>0,'uniacid'=>$_SESSION['uniacid']),'level');
		$_SESSION['jlevel']=$levelid;
		$_SESSION['fewm']=$item['id'];
	}
	exi('','',$item['url']?:'jy_weishop/index/');
	$sharelink='jy_ewmfee/index//fromuser='.$_SESSION['uid'];
	$return['sharedata']=array(
		'title'=>$this->setting['share_title'],
		'desc'=>$this->setting['share_desc'],
		'link'=>$sharelink,
		'imgUrl'=>tomedia($this->setting['share_image']),
	);
	set_html('title',$return['shopset']['title']?:'首页-在线二维码');
	set_html('keywords',$page['keywords']?:$return['setting']['share_keywords']);
	exi($return);
}
	
?>